//
//  CustomTextField.m
//  SHHCPhone
//
//  Created by sheng long on 14-6-24.
//  Copyright (c) 2014年 sheng long. All rights reserved.
//

#import "CustomTextField.h"

@implementation CustomTextField

@synthesize PlaceholderColor,PlaceholderFont;

- (void)drawPlaceholderInRect:(CGRect)rect
{
    [GET_COLOR(@"616161") setFill];
    [[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:12.5]];
}

-(CGRect)placeholderRectForBounds:(CGRect)bounds
{
    CGRect inset = CGRectMake(bounds.origin.x, bounds.origin.y+12.5, bounds.size.width, bounds.size.height);
    return inset;
}

-(CGRect)editingRectForBounds:(CGRect)bounds
{
    CGRect inset = CGRectMake(bounds.origin.x, bounds.origin.y+(CURRENT_VERSION_SEVEN?0:10), bounds.size.width, bounds.size.height);
    return inset;
}

-(CGRect)textRectForBounds:(CGRect)bounds
{
    CGRect inset = CGRectMake(bounds.origin.x, bounds.origin.y+(CURRENT_VERSION_SEVEN?0:10), bounds.size.width, bounds.size.height);
    return inset;
}

@end
